package edu.bu.met683.TravelDroid.Tests;

import java.util.ArrayList;
import java.util.List;

import android.location.Location;

public final class Tour {
	
	//constructor
	public Tour() {
		super();
	}
	public List<PointOfInterest> PointsOfInterest;
	
	public Tour(int id, String name, String description, double length) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.length = length;;
		this.PointsOfInterest = new ArrayList<PointOfInterest>();
	}

	public Location GetStartingPoint()
	{
		Location start = new Location(description);
		for(PointOfInterest point : this.PointsOfInterest)
		{
			if(0 == point.getSequence()) //assuming that 0 will be the sequence of the starting point
			{
				start.setLatitude(point.getLatitude());
				start.setLongitude(point.getLongitude());
				return start;
			}
		}
		return null;
	}
	
	//private properties
	private int id;
	private String name;
	private String description;
	private double length;
	private double proximity; //distance from the starting point to the users current location
	
	//public properties
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public double getLength() {
		return length;
	}
	public void setLength(double length) {
		this.length = length;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public double getProximity() {
		return proximity;
	}

	public void setProximity(double proximity) {
		this.proximity = proximity;
	}


}
